import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// axios.defaults.baseURL = 'https://d33a5037-6c63-4e92-8bb1-30018ab701ea.bspapp.com';
// Vue.prototype.$http = axios;

Vue.config.productionTip = false
//全局挂载 相当于是vue里挂载了两个全局组件
// import { Button,Cell, CellGroup } from 'vant';
import { Tab, Tabs,Search, Grid, GridItem,Toast,Icon ,Form,Field ,Button,Cell} from 'vant';
// import { Search ,Toast } from 'vant';
import { Image as VanImage } from 'vant';
import { PullRefresh } from 'vant';

Vue.use(PullRefresh);

Vue.use(VanImage);
import { NavBar } from 'vant';
import { Picker } from 'vant';
import { Popup } from 'vant';
import { DatetimePicker } from 'vant';
import { List } from 'vant';

Vue.use(List);
Vue.use(DatetimePicker);
Vue.use(Popup);


Vue.use(Picker);
Vue.use(NavBar);
// Vue.use(Tabbar);
// Vue.use(TabbarItem);
Vue.use(Grid);
Vue.use(GridItem);
Vue.use(Search)
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Toast);
Vue.use(Icon);
Vue.use(Form);
Vue.use(Field);
Vue.use(Button);
Vue.use(Cell);

let token = localStorage.getItem('token')
 if(!token){
//第一次 没登录
 }else{
//token  有token 证明登陆过
 }
 
store.dispatch('getUserInfo',token)


Vue.prototype.$bus =new Vue()

// Vue.prototype.$http= axios

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
